package cn.patient.pp.module.patients.controller.admin.vo.importExecl;

import cn.patient.pp.framework.excel.core.annotations.DictFormat;
import cn.patient.pp.framework.excel.core.convert.DictConvert;
import cn.patient.pp.framework.excel.core.convert.NullableNumberConverter;
import cn.patient.pp.framework.mybatis.core.dataobject.BaseDO;
import cn.patient.pp.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
@TableName("follow_up_list")
public class FollowUpExcelVO extends BaseDO {
    @ExcelIgnore
    private Long deptId;
    /**
     * 姓名
     */
    @Schema(description = "姓名")
    @ExcelProperty("姓名")
    private String patientName;

    /**
     * 性别
     */
    @Schema(description = "性别")
    @ExcelProperty(value ="性别",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.GENDER)
    private String gender;

    /**
     * 管理地区
     */
    @Schema(description = "管理地区")
    @ExcelProperty("管理地区")
    private String managementArea;

    /**
     * 所属机构
     */
    @Schema(description = "所属机构")
    @ExcelProperty("所属机构")
    private String managementOrgName;

    /**
     * 患者编号
     */
    @Schema(description = "患者编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("患者编号")
    private String patientCode;

    /**
     * 证件类型
     */
    @Schema(description = "证件类型")
    @ExcelProperty("证件类型")
    private String idNumberType;

    /**
     * 证件号码
     */
    @Schema(description = "证件号码")
    @ExcelProperty("证件号码")
    private String idNumber;

    /**
     * 目前诊断类别
     */
    @Schema(description = "目前诊断类别")
    @ExcelProperty(value = "目前诊断类别",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.CURRENT_DIAGNOSIS_CATEGORY)
    private String currentDiagnosisCategory;

    /**
     * 当前管理单位分库状态
     */
    @Schema(description = "当前管理单位分库状态")
    @ExcelProperty(value = "当前管理单位分库状态",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.SUB_LIBRARY_STATUS)
    private String currentOrgSubDbStatus;

    /**
     * 录入日期
     */
    @Schema(description = "录入日期")
    @ExcelProperty("录入日期")
    private String entryDate;

    /**
     * 随访日期
     */
    @Schema(description = "随访日期")
    @ExcelProperty("随访日期")
    private String followUpDate;

    /**
     * 本次随访形式
     */
    @Schema(description = "本次随访形式")
    @ExcelProperty(value = "本次随访形式",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.RANDOM_ACCESS_TYPE)
    private String followUpMode;

    /**
     * 面访形式
     */
    @Schema(description = "面访形式")
    @ExcelProperty(value = "面访形式",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.INTERVIEW_FORM)
    private String faceToFaceMode;

    /**
     * 本次随访访视对象
     */
    @Schema(description = "本次随访访视对象")
    @ExcelProperty(value = "本次随访访视对象",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.VISIT_TARGET)
    private String followUpTarget;

    /**
     * 是否死亡
     */
    @Schema(description = "是否死亡")
    @ExcelProperty(value = "是否死亡",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.DECEASED)
    private String deceased;

    /**
     * 死亡日期
     */
    @Schema(description = "死亡日期")
    @ExcelProperty("死亡日期")
    private String dateOfDeath;

    /**
     * 失访原因
     */
    @Schema(description = "失访原因")
    @ExcelProperty(value = "失访原因",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.LOST_REASON)
    private String lostContactReason;

    /**
     * 两次随访期间住院情况
     */
    @Schema(description = "两次随访期间住院情况")
    @ExcelProperty(value = "两次随访期间住院情况",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.HOSPITALIZATION_BETWEEN_VISITS)
    private String hospitalizationStatusBetween;

    /**
     * 末次出院时间
     */
    @Schema(description = "末次出院时间")
    @ExcelProperty("末次出院时间")
    private String lastDischargeDate;

    /**
     * 危险性评估
     */
    @Schema(description = "危险性评估")
    @ExcelProperty(value = "危险性评估",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.RISK_ASSESSMENT)
    private String riskAssessment;

    /**
     * 目前症状有无
     */
    @Schema(description = "目前症状有无")
    @ExcelProperty(value = "目前症状有无",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.HAS_CURRENT_SYMPTOMS)
    private String currentSymptoms;

    /**
     * 目前症状
     */
    @Schema(description = "目前症状")
    @ExcelProperty(value = "目前症状",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.SYMPTOMS)
    private String currentSymptomsDetail;

    /**
     * 自知力
     */
    @Schema(description = "自知力")
    @ExcelProperty(value = "自知力",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.INSIGHT)
    private String insight;

    /**
     * 睡眠
     */
    @Schema(description = "睡眠")
    @ExcelProperty(value = "睡眠",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.STATUS)
    private String sleepCondition;

    /**
     * 饮食
     */
    @Schema(description = "饮食")
    @ExcelProperty(value = "饮食",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.STATUS)
    private String eatingCondition;

    /**
     * 个人生活料理
     */
    @Schema(description = "个人生活料理")
    @ExcelProperty(value = "个人生活料理",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.STATUS)
    private String selfCare;

    /**
     * 家务劳动
     */
    @Schema(description = "家务劳动")
    @ExcelProperty(value = "家务劳动",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.STATUS)
    private String householdTasks;

    /**
     * 生产劳动及工作
     */
    @Schema(description = "生产劳动及工作")
    @ExcelProperty(value = "生产劳动及工作",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.STATUS)
    private String workStatus;

    /**
     * 学习能力
     */
    @Schema(description = "学习能力")
    @ExcelProperty(value = "学习能力",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.STATUS)
    private String learningAbility;

    /**
     * 社会人际交往
     */
    @Schema(description = "社会人际交往")
    @ExcelProperty(value = "社会人际交往",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.STATUS)
    private String socialInteraction;

    /**
     * 危险行为有无
     */
    @Schema(description = "危险行为有无")
    @ExcelProperty(value = "危险行为有无",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.HAS_DANGER_BEHAVIOR)
    private String dangerousBehaviorsFlag;

    /**
     * 轻度滋事
     */
    @Schema(description = "轻度滋事")
    @ExcelProperty("轻度滋事")
    private Integer minorNuisanceCount;

    /**
     * 肇事（次）
     */
    @Schema(description = "肇事（次）")
    @ExcelProperty(value = "肇事（次）", converter = NullableNumberConverter.class)
    private Integer incidentCount;

    /**
     * 肇祸（次）
     */
    @Schema(description = "肇祸（次）")
    @ExcelProperty(value = "肇祸（次）", converter = NullableNumberConverter.class)
    private Integer harmfulIncidentCount;

    /**
     * 其他危险行为（次）
     */
    @Schema(description = "其他危险行为（次）")
    @ExcelProperty(value = "其他危险行为（次）", converter = NullableNumberConverter.class)
    private Integer otherDangerousBehaviorCount;

    /**
     * 自伤（次）
     */
    @Schema(description = "自伤（次）")
    @ExcelProperty(value = "自伤（次）", converter = NullableNumberConverter.class)
    private Integer selfInjuryCount;

    /**
     * 自杀未遂（次）
     */
    @Schema(description = "自杀未遂（次）")
    @ExcelProperty(value = "自杀未遂（次）", converter = NullableNumberConverter.class)
    private Integer suicideAttemptCount;

    /**
     * 两次随访期间关锁情况
     */
    @Schema(description = "两次随访期间关锁情况")
    @ExcelProperty(value = "两次随访期间关锁情况",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.LOCK_STATUS)
    private String seclusionStatus;

    /**
     * 服药依从性
     */
    @Schema(description = "服药依从性")
    @ExcelProperty(value = "服药依从性",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.MEDICATION_ADHERENCE)
    private String medicationAdherence;

    /**
     * （服药依从性）不用药主要原因
     */
    @Schema(description = "服药依从性(不用药主要原因)")
    @ExcelProperty(value = "服药依从性(不用药主要原因)",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.NONADHERENCE_REASON)
    private String reasonNotTakingMedication;

    /**
     * 医生姓名
     */
    @Schema(description = "医生姓名")
    @ExcelProperty("医生姓名")
    private String doctor;

    /**
     * 医院
     */
    @Schema(description = "医院")
    @ExcelProperty("医院")
    private String hospital;

    /**
     * 药物不良反应
     */
    @Schema(description = "药物不良反应")
    @ExcelProperty("药物不良反应")
    private String adverseDrugReactions;

    /**
     * 药物不良反应类型
     */
    @Schema(description = "药物不良反应类型")
    @ExcelProperty("药物不良反应类型")
    private String adverseDrugReactionsType;

    /**
     * 治疗效果
     */
    @Schema(description = "治疗效果")
    @ExcelProperty(value = "治疗效果",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.TREATMENT_EFFECT)
    private String treatmentEffect;

    /**
     * 严重躯体疾病有无
     */
    @Schema(description = "严重躯体疾病有无")
    @ExcelProperty(value ="严重躯体疾病有无",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.HAS_SEVERE_PHYSICAL_DISEASE)
    private String hasSeverePhysicalDisease;

    /**
     * 严重躯体疾病请注明
     */
    @Schema(description = "严重躯体疾病请注明")
    @ExcelProperty("严重躯体疾病请注明")
    private String severePhysicalDiseaseRemark;

    /**
     * 是否已转诊
     */
    @Schema(description = "是否已转诊")
    @ExcelProperty(value = "是否已转诊",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.REFERRED)
    private String referralFlag;

    /**
     * 建议转诊原因
     */
    @Schema(description = "建议转诊原因")
    @ExcelProperty("建议转诊原因")
    private String referralReason;

    /**
     * 转诊至机构及科室
     */
    @Schema(description = "转诊至机构及科室")
    @ExcelProperty("转诊至机构及科室")
    private String referralDestination;

    /**
     * 康复措施
     */
    @Schema(description = "康复措施")
    @ExcelProperty(value = "康复措施",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.REHABILITATION_MEASURE)
    private String rehabilitationMeasures;

    /**
     * 本次随访分类
     */
    @Schema(description = "本次随访分类")
    @ExcelProperty(value = "本次随访分类",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.FOLLOWUP_DISEASE_CLASSIFICATION)
    private String currentFollowupType;

    /**
     * 是否进行个案管理
     */
    @Schema(description = "是否进行个案管理")
    @ExcelProperty(value = "是否进行个案管理",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.CASE_MANAGED)
    private String caseManagementFlag;

    /**
     * 应急处置
     */
    @Schema(description = "应急处置")
    @ExcelProperty("应急处置")
    private String emergencyHandling;

    /**
     * 下次随访日期
     */
    @Schema(description = "下次随访日期")
    @ExcelProperty("下次随访日期")
    private String nextFollowUpDate;

    /**
     * 记录纸
     */
    @Schema(description = "记录纸")
    @ExcelProperty("记录纸")
    private String recordSheet;


}
